<?php
/**
 * The following variables are available in this template:
 * - $this: the CrudCode object
 */
?>


<?php echo "<?php \$form=\$this->beginWidget('CActiveForm', array(
	'id'=>'".$this->class2id($this->modelClass)."-form',
	'enableAjaxValidation'=>false,
	'htmlOptions'=>array(
		'class' => 'form collapsed',
	),
)); ?>\n"; ?>
<fieldset class="grey inline">
	<legend><?php echo "<?php echo \$this->action->id; ?>"; ?></legend>
	
	<div class="notification tip" style="display: block; "> 
    <span class="strong">Tip:</span> <?php echo "<?php echo \$form->errorSummary(\$model); ?>\n"; ?> <span class="close" title="Dismiss"></span>
    </div>
<?php
foreach($this->tableSchema->columns as $column)
{
	if($column->autoIncrement)
		continue;
?>
	<label>
		<?php echo "<?php echo ".$this->generateActiveLabel($this->modelClass,$column)."; ?>\n"; ?>
		<?php echo "<?php echo ".$this->generateActiveField($this->modelClass,$column)."; ?>\n"; ?>
		<?php echo "<?php //echo \$form->error(\$model,'{$column->name}'); ?>\n"; ?>
	</label>

<?php
}
?>
	<?php echo "<?php echo CHtml::submitButton(\$model->isNewRecord ? '创建' : '保存',array('class'=>'button blue')); ?>\n"; ?>
</fieldset>
<?php echo "<?php \$this->endWidget(); ?>\n"; ?>

